Michael Tokarev [Fri, 8 Apr 2022 08:50:21 +0000 (11:50 +0300)]
disable setuid configure checks
Forwarded: not-needed
For some strange reason, when running reprotest test on salsa-ci,
which apparently is running as root, - on the *second* build only
the configure fails (after successfully built package the first
time). The configure test tries to change gid and verifies it
actually changed (not that the syscall exist), - and that fails.
Since it is extremely uncommon to configure the build process as
root, salsa-ci test environment details are quite deep down the line,
and we know the syscall actually works, just disable the probe,
pretending we are not root.
For upstream, this probably should be done by removing a *lot* of
configure-time checks which are useless these days.
Samba uses memset_s() to zero-fill unused sensitive memory
areas. This interface is difficult to use right, and is not
implemented in glibc due to this. So many parts of samba
link to libreplace to get rep_memset_s(). But glibc provides
explicit_bzero(), so there's no need for this linkage.
Unfortunately there are just insane amount of similar
but non-standard functions, and upstream don't want
to stay on something simple and robust in this context.
Gbp-Pq: Name use-explicit_bzero-to-zero-memory.diff
CTDB uses /var/log/ctdb/ directory for the default log files. With
syslog disabled, systemd journal is not able to correctly inform
errors happening during service initialization.
Upstream community creates generic config files to be used by different
distributions, so this change makes no big difference to be accepted by
upstream.
With this patch the end user will be able to identify initialization
errors by executing:
systemctl status ctdb.service
or to follow ctdb logs by executing:
journalctl -f -u ctdb
Signed-off-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
Gbp-Pq: Name ctdb-config-enable-syslog-by-default.patch
Upstream defines nfs related service names based on the Linux
distribution. This patch fixes the names for Debian and derivatives.
Update by Andreas Hasenack <andreas@canonical.com> (LP: #1961840):
Use nfsconf(8) if it's available, instead of parsing the old config
files in /etc/default/nfs-*
Michael Tokarev [Wed, 27 Nov 2024 18:51:50 +0000 (21:51 +0300)]
drop "replace" dependency from libldb
Forwarded: not-needed
When building as a sub-library within samba, where
libreplace is a private library, libldb.so will
have rpath pointing to the private samba dir. Since
ldb actually does not use anything from libreplace,
just remove the dependency.
Jeroen Dekkers [Sun, 8 Mar 2026 11:27:42 +0000 (14:27 +0300)]
Add so version number to private libraries for dpkg-shlibdeps
We also want dpkg-shlibdeps to generate correct dependency information
for the private libraries in our binary packages, but dpkg-shlibdeps
only works when the library has a version number.
Michael Tokarev [Thu, 3 Nov 2022 17:49:33 +0000 (20:49 +0300)]
hurd compatibility changes
Hurd does not define PIPE_BUF, so lib/tevent/testsuite.c fails to compile
(yes, this file is used as part of *samba* testsuite, not tevent testsuite).
Define it to a safe minimal value like 512 bytes.
Hurd does not provide SA_NOCLDWAIT define, so lib/util/tests/tfork.c does
not compile. This is only needed during testing to omit zombie process
generation, which has only cosmetic effect. Define it to be 0.
Michael Tokarev [Tue, 26 Nov 2024 14:28:51 +0000 (17:28 +0300)]
force tdb to be standalone
Forwarded: not-needed
Upstream ships contents of lib/tdb/ as a separate
source of tdb. Since we build samba anyway, there's
no need to have separate tdb source package, it's
enough to build it during samba build.
Always build tdb as stand-alone library
(instead of being samba-private if in a subdir).
When building as a sub-library within samba,
where libreplace is a private library, libtdb.so
will have rpath pointing to the private samba
dir. Since tdb actually does not use anything
from libreplace, just remove the dependency.
Michael Tokarev [Tue, 26 Nov 2024 14:28:51 +0000 (17:28 +0300)]
force tevent to be standalone
Forwarded: not-needed
Upstream ships contents of lib/tevent/ as a separate
source of tevent. Since we build samba anyway, there's
no need to have separate tevent source package, it's
enough to build it during samba build.
Always build tevent as stand-alone library
(instead of being samba-private if in a subdir).
When building as a sub-library within samba, where
libreplace is a private library, libtevent.so will
have rpath pointing to the private samba dir. Since
tevent actually does not use anything from libreplace,
just remove the dependency.
Michael Tokarev [Tue, 26 Nov 2024 14:28:51 +0000 (17:28 +0300)]
force talloc to be standalone
Forwarded: not-needed
Upstream ships contents of lib/talloc/ as a separate
source of talloc. Since we build samba anyway, there's
no need to have separate talloc source package, it's
enough to build it during samba build.
Always build talloc as stand-alone library
(instead of being samba-private if in a subdir).
When building as a sub-library within samba, where
libreplace is a private library, libtalloc.so will
have rpath pointing to the private samba dir. Since
talloc actually does not use anything from libreplace,
just remove the dependency.
We build samba with LFS (Large File Support) even on 32bits.
This means some types like off_t are 64-bit wide, again,
even on a 32bit host. libsmbclient.h uses off_t in function
prototypes, and thes prototypes muct match those which were
used at samba compile time - if some other source includes
libsmbclient.h without LFS, it'll get wrong prototypes and
the resulting binary will most likely crash when using
libsmbclient functions.
Detect and error-out this at compile time.
We can not do anything with this in the public header since
it is alredy too late to redefine things, since we can't
guarantee we're the first header a program #includes, and
at the time this libsmbclient.h is included, off_t can
already be defined so our (re)define of _FILE_OFFSET_BITS
does nothing already.
Patching libsmbclient.h to use off64_t means client program
should change their off_t to off64_t too when storing
file offsets returning from libsmbclient, so this is not
an option too.
With this change, we will error out even if the user source
does not use any off_t-related functions. Namely, it was ok
to #include <libsmbclient.h> and use smbc_open/smbc_read/
smbc_write/smbc_close without _F_O_B=64, - neither of these
functions uses off_t. smbc_lseek and others doesn't work,
but if a program does not use them anyway, whole thing will
just work even without enabling LFS. Ideally we can probably
check each individual function which is being affected, by
replacing it with #error if sizeof(off_t) < 8. But this
requires quite some hackery...
Michael Tokarev [Sun, 8 Mar 2026 11:27:42 +0000 (14:27 +0300)]
samba (2:4.23.6+dfsg-2) unstable; urgency=medium
* samba-bgqd.service: ship a unit file, but not auto-enable it
* d/rules: do not enable nmbd by default
* d/control: drop libnss-winbind & libpam-winbind from
samba-ad-dc:Recommends (Closes: #1130068)